package com.changgou.web.gateway.filter;

public class UrlFilter {
	public static String filterPath = "/api/wseckillorder,/api/seckill,/api/wxpay,/api/wxpay/**," +
			"/api/worder/**,/api/user/**,/api/address/**,/api/wcart/**,/api/cart/**,/api/categoryReport/**," +
			"/api/orderConfig/**,/api/order/**,/api/orderItem/**,/api/orderLog/**,/api/preferential/**," +
			"/api/returnCause/**,/api/returnOrder/**,/api/returnOrderItem/**,"+"/api/search/**,"+"/api/footmark/**," +
			"/api/winfo/**,/api/info/**," +
			"/api/head," +
			"/api/wuser/**";
	public static boolean hasAuthorize(String url){
		String[] split = filterPath.replace("/**", "").split(",");
		for (String value : split) {
			if (url.startsWith(value)){
				return true;  //当前访问地址需要传递令牌
			}
		}
		return false;    //不需要传递令牌
	}
}
